#include<linux/irq.h>
#include<linux/interrupt.h>
#include<linux/module.h>
MODULE_LICENSE("GPL");
static int irq=2;

static irqreturn_t irq_handler(int irq,void *dev_id)
{
	printk("the irq is :%d\n",irq);
	printk("in the interrupt handler function\n");
	return IRQ_WAKE_THREAD;
}
static irqreturn_t irq_thread_fn(int irq,void *dev_id)
{
	printk("the irq is:%d\n",irq);
	printk("in the thread handler function\n");
	return IRQ_HANDLED;
}
static int __init irq_set_chip_init(void)
{
	int result=0;
	int result1=0;
	printk("into irq_set_chip_init\n");

	result=request_threaded_irq(irq,irq_handler,irq_thread_fn,IRQF_DISABLED,"A_device5",NULL);
	result1=irq_set_chip(irq,NULL);
	printk("the request_threaded_irq result is:%d\n",result);
	printk("the irq_set_chip result is:%d\n",result1);

	printk("out irq_set_chip_init\n");
}
static void __exit irq_set_chip_exit(void)
{
	printk("Goodbye irq_set_chip\n");
	return;
}
module_init(irq_set_chip_init);
module_exit(irq_set_chip_exit);

